Skip to content

Conversation

sleepyStick
Copy link
Contributor

@sleepyStick sleepyStick marked this pull request as ready for review July 10, 2023 15:57


@overload
def decode(data: "_ReadableBuffer", codec_options: None = None) -> Dict[str, Any]:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! This is great! I think we want to apply this same overload pattern throughout the codebase but I think that's too much for this PR. Could you open a new ticket for it? Eg decode_all, decode_iter, and anywhere else we use _DocumentType.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sounds good, made the ticket

bson/raw_bson.py Outdated
def _inflate_bson(
bson_bytes: bytes, codec_options: CodecOptions, raw_array: bool = False
) -> Mapping[Any, Any]:
) -> MutableMapping[Any, Any]:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use dict here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes!

@sleepyStick sleepyStick merged commit f813f56 into mongodb:master Jul 11, 2023
@sleepyStick sleepyStick deleted the PYTHON-3803 branch July 11, 2023 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants